<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>用户列表</h3></div>
                <div class="fr">
                    <form class="search-form" method="post" action="">
                        <span>查询条件:</span>
                        <select name="field">
                            <option value="username" <if condition="$filter.field eq 'username'">selected="selected"</if>>用户名</option>
                            <option value="title" <if condition="$filter.field eq 'title'">selected="selected"</if>>职位</option>
                        </select>
                        <input name="value" value="{$filter.value}" type="text" placeholder="输入关键字按回车" />
                        <input name="page" value="{$filter.page}" type="hidden" />
                        <input name="order_field" value="{$filter.order_field}" type="hidden" />
                        <input name="order_sort" value="{$filter.order_sort}" type="hidden" />
                        <button class="btn-normal" type="submit">查 询</button>
                    </form>
                </div>
            </div>
            <div class="line2">
                <div class="fl form-btn-group">
                    <in name="$x|default='02-01-02'" value="$rightsCode">
                        <button onclick="location.href='/admin/user/add'" class="btn-create btn-highlight">新 建</button>
                        <else />
                        <button class="btn-create btn-disable" disabled="disabled">新 建</button>
                    </in>
                </div>
                <div class="fl form-btn-more">
                    <button class="btn-normal btn-more">更多操作<i class="drop-down"></i></button>
                    <ul class="more-action hidden">
                        <in name="$x|default='02-01-02'" value="$rightsCode">
                            <li><a onclick="action_del();" href="javascript:void(0);">删 除</a></li>
                        </in>
                    </ul>
                </div>
                <div class="fr form-search-count">
                    <span class="offset">({$page.from}-{$page.to})</span>
                    <span class="total">共{$page.total}条</span>
                    <button onclick="PageJump({$page.prevPage});" class="btn-normal">上一页</button>
                    <button onclick="PageJump({$page.nextPage});" class="btn-normal">下一页</button>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box">
        <table class="list">
            <thead>
                <tr>
                    <th width="3%"><input id="select-all" type="checkbox" /></th>
                    <th class="list-header" field="username" sort="{$filter.order_sort}">
                        用户名<if condition="$filter.order_field eq 'username'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="role" sort="{$filter.order_sort}">
                        角色<if condition="$filter.order_field eq 'role'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="phone" class="list-header" sort="{$filter.order_sort}">
                        联系电话<if condition="$filter.order_field eq 'phone'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th class="list-header" field="active" sort="{$filter.order_sort}">
                        禁用？<if condition="$filter.order_field eq 'active'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                </tr>
            </thead>
            <tbody>
                <volist name="list" id="vo" key="index">
                    <tr class="user-info" offset="{$vo.offset}" data-id="{$vo.id}">
                        <td class="checkbox-cell"><input class="checkbox" data-id="{$vo.id}" type="checkbox" /></td>
                        <td>{$vo.username}</td>
                        <td>{$role[$vo['role_id']]}</td>
                        <td>{$vo.phone}</td>
                        <td>
                            <if condition="$vo.disable eq 1">
                                <input type="checkbox" checked="checked" disabled="disabled" />
                                <else />
                                <input type="checkbox" disabled="disabled" />
                            </if>
                        </td>
                    </tr>
                </volist>
            </tbody>
        </table>
    </div>
</div>
<script src="__JS__/user.js?v=0.1" type="text/javascript" ></script>
<include file="Public:footer" />

